/*
 * @lc app=leetcode.cn id=367 lang=cpp
 *
 * [367] 有效的完全平方数
 */

// @lc code=start
#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
    bool isPerfectSquare(int num)
    {
        if (num < 0)
            return false;
        int n = sqrt(num);
        return (n * n == num);
    }
};
// @lc code=end
